<template>
    <h3>组合式api</h3>
    <p>{{ count }}</p>
    <p>{{ count }}</p>
    <p>iwh</p>
    <button @click="add">增加</button>
</template>

<script setup>
import {ref,watch} from "vue"

const count=ref(0)

function add(){
    count.value++
}

watch(count,(newValue,oldValue)=>{
    console.log(newValue,oldValue)
})

</script>